package com.xiaowen.wxpaytool;

import com.xiaowen.wxpaytool.modle.PrepayRequest;
import com.xiaowen.wxpaytool.modle.RefundRequest;
import org.springframework.beans.factory.annotation.Autowired;

public class RequestBuilder {
    @Autowired
    WxPayProperties wxPayProperties;
    public PrepayRequest getprepayrequest(String out_trade_no,  String openid, String notify_url,Integer total){
        PrepayRequest request=new PrepayRequest(wxPayProperties.getAppid(),wxPayProperties.getMchid(),out_trade_no,notify_url,openid,total);
        return request;
    }
    public RefundRequest getprefundrequest(String out_trade_no,String out_refund_no, Integer amount,String notify_url){
        RefundRequest request=new RefundRequest(out_trade_no,out_refund_no,amount,notify_url);
        return request;
    }


}
